Versions:
cargo-shear is a Rust development tool published by Boshen that detects and fixes issues in Rust projects, with a particular focus on cleaning up Cargo.toml manifests and maintaining a tidy, well-organized codebase. Its primary purpose is to identify unused dependencies declared in Cargo.toml, enabling developers to remove entries that no longer contribute to the build and thereby reduce dependency bloat, compile overhead, and unnecessary external packages in a project's dependency graph. In addition to unused dependency detection, cargo-shear identifies misplaced dependencies, such as dev-dependencies or build-dependencies that have been declared in the wrong sections of the manifest, and assists in moving them to their correct locations so that the Cargo.toml file accurately reflects how each dependency is actually used. The tool also detects unlinked source files, meaning Rust files that are not reachable from any module tree, which helps developers find orphaned code that would otherwise sit unnoticed in a repository and complicate maintenance over time. Because it both detects and fixes these issues, cargo-shear can be applied as an automated cleanup step in everyday development workflows, code review processes, or continuous integration pipelines where manifest hygiene and project structure need to be enforced consistently. cargo-shear falls within the category of Rust developer tooling, specifically among utilities for dependency management, manifest maintenance, and project linting, and it complements the broader Cargo ecosystem that Rust developers rely on for building and managing their projects. The current version of cargo-shear is 1.13.4, and the software has been released across seven versions in total, indicating an active release history with ongoing updates and refinements to its detection and fixing capabilities. Overall, cargo-shear provides a focused, practical solution for keeping Rust projects free of unused dependencies, correctly structured manifests, and unreachable source files.
Tags: